package model

import "fmt"

type Customer struct {
	Id     int
	Name   string
	Gender string
	Age    uint8
	Phone  string
	Email  string
}

func NewCustomer(id int, name string, gender string, age uint8, phone string,
	email string) *Customer {
	return &Customer{
		Id:     id,
		Name:   name,
		Gender: gender,
		Age:    age,
		Phone:  phone,
		Email:  email,
	}
}

func (c *Customer) ToString() string {
	return fmt.Sprintf("%v\t%v\t%v\t%v\t%v\t%v\n", c.Id, c.Name, c.Gender,
		c.Age, c.Phone, c.Email)
}

func GetTableHeader() string {
	return fmt.Sprintf("%v\t%v\t%v\t%v\t%v\t%v\n", "用户编号", "用户名", "性别", "年龄",
		"手机号", "Email")
}
